#include <stdio.h>
#include "platform.h"
#include "xparameters.h"
#include "sleep.h"
#include "zrcar.h"
#include "xuartps.h"

#include "math.h"
#include "xgpiops.h"

int main()
{
    /*********init*******/
    zrcar_bluetooth_init();
    int check;

    //zrcar_gpio_init();
    u8 blue_data[2];
    u8 rxBuf=1;
    // car_forward();
     int i;
    while(1)
    {
        //while(flag == 0)  //receive until finished receiving a frame.
        check = zrcar_bluetooth_recv(blue_data,2);
        if(check){
            for(i = 0; i < check ; i++){
                zrcar_bluetooth_send(&blue_data[i],1);
            }
        }
        sleep(1);
    }
    return 0;
}

